home *** CD-ROM | disk | FTP | other *** search
/ Sound Blastoff / Sound Blastoff.iso / Sound Utilities / Parrot10b1 Folder / source / Confusion.h < prev    next >
Text File  |  1993-09-06  |  2KB  |  92 lines

  1. typedef struct {
  2.     Handle    buffer;
  3.     short    headerlength;
  4.     long    buffSize;
  5.     Boolean    playable;
  6. } BufInfo;
  7.  
  8. typedef enum play_record
  9.     {
  10.     iPlay,
  11.     iRecord
  12.     }
  13. PlayOrRec;
  14.  
  15. typedef struct {
  16.     Boolean            fullBuffer;
  17.     Boolean         loudEnough;
  18.     short            bufferGettingFilled;
  19.     short            numBuffers;
  20.     BufInfo            *buffers;
  21.  
  22.  
  23.     SPBPtr            RecordRec;
  24.     long            SoundRefNum;
  25.     SndChannelPtr    rightChan;
  26.     SndChannelPtr    leftChan;
  27.     Fixed            sampleRate;
  28.     Boolean            firstTime;
  29.     PlayOrRec        direction;
  30. } SCGlobals;
  31.  
  32.  
  33. void        BufPlay (Handle Buf, SndChannelPtr    channel);
  34. Handle        SetUpSounds (Handle Buf, short *HeaderSize, Fixed sampRate);
  35. short        RndRange(short min, short max);
  36. short        PickPlayableBuffer(BufInfo *buffers, short max);
  37. short        PickReadableBuffer(BufInfo *buffers, short max);
  38. void        InitSoundConfusion(void);
  39. void        ConfuseSound(void);
  40. void        StopConfusion(void);
  41. void        DoAbout(void);
  42. pascal void    MyRecComp (SPBPtr inParamPtr);
  43. long        TrimBuffer(Handle buffer, long headerlen);
  44. void        ResetChannels(void);
  45. unsigned char *Pstrcat(register Str255 s1, register Str255 s2);
  46.  
  47. /* Resources */
  48. #define rMenuBar    128
  49.  
  50. #define mApple        128
  51. #define iAbout        1
  52.  
  53. #define mFile        129
  54. #define iQuit        1
  55.  
  56. #define mEdit        130
  57.  
  58. #define rAboutAlert    128
  59. #define rErrAlert    129
  60.  
  61. #define rErrStrings    128
  62. enum
  63.     {
  64.     iGeneral=1,
  65.     iAEErr,
  66.     iPlaying,
  67.     iSetupBuffer,
  68.     iNoInput,
  69.     iGestaltFailed,
  70.     iStarting,
  71.     iMemory,
  72.     iReadingLevel,
  73.     iRecording,
  74.     iClosing,
  75.     iMakingGlobals,
  76.     iOpeningDevice,
  77.     iGettingRate,
  78.     iMakingRecordRec,
  79.     iAllocatingBuffers,
  80.     iMakingLeft,
  81.     iMakingRight,
  82.     iMakingMono,
  83.     iGettingSMStatus
  84.     };
  85.  
  86. #define rSettingStrings    129
  87. enum
  88.     {
  89.     iThreshold=1,
  90.     iBufferSize
  91.     };
  92.